package cn.getech.data.development.mapper;

import cn.getech.data.development.entity.ProcInfo;
import cn.getech.data.development.entity.RealTimeTaskMenu;
import cn.getech.data.development.model.vo.IdAndNameVO;
import cn.getech.data.development.model.vo.RealTimeTaskMenuSearchVO;
import cn.getech.data.development.model.vo.RealTimeTaskMenuVO;
import cn.getech.data.development.model.vo.RealTimeTaskOpsVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface RealTimeTaskMenuMapper extends BaseMapper<RealTimeTaskMenu> {

    List<RealTimeTaskMenuVO> menuList(RealTimeTaskMenuSearchVO vo);

    IPage<RealTimeTaskOpsVO> pageList(Page page,@Param("params") RealTimeTaskMenuSearchVO params);

    Map<String,Object> jobReportCount(@Param("params") RealTimeTaskMenuSearchVO params);

    List<Integer> getProcIdByUser(@Param("userId") Long userId);

    List<ProcInfo> procs(@Param("userId") Long userId, @Param("tenantId") Integer tenantId);

    List<IdAndNameVO> listByProcIdAndType(@Param("procId")Integer procId, @Param("taskType")Integer taskType);

    List<Long> listUserIds(@Param("userId")Long userId, @Param("tenantId")Integer tenantId);
}
